{/include file="simpla/common/header.html"/}
{/include file="simpla/common/left.html"/}
<div id="main-content">
  <h2>欢迎您 {/$_adminname/}</h2>
  <p id="page-intro">打印小票。</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>打印小票</h3>
      <div class="clear"></div>
    </div>
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1">
      
        <table width="400" id="print">
  <thead>
          <tr >
            <td colspan="3">订单号：<span id="order_id">{/$order_id/}</span><br>付款时间：{/$dateline|date_format:"%Y-%m-%d %H:%M"/}</td>
          </tr>
          <tr>
            <th  width="32">序号</th>
            <th>商品名称</th>
            <th>数量</th>
            <th>总价</th>
          </tr>
      </thead>
      <tbody>
      {/php/}$ns=0;{//php/}
          {/section name=i loop=$goods/}
          <tr>
            <td> {/php/}$ns=$ns+1;echo $ns;{//php/}</td>
            <th><p>{/$goods[i].goods_name/}</p></th>
            <td>{/$goods[i].num/}</td>
            <td>{/$goods[i].out_price*$goods[i].num/}</td>
          </tr>
          {//section/}
        </tbody>
          <tfoot>
          <tr>
            <td colspan="3" class="alt">总价：{/$out_amount/}元<br>优惠：{/if $mem_amount gt 0/}{/$mem_amount/}元{/elseif $pro_amount gt 0/}{/$pro_amount/}元{/else/}无{//if/}<br>实收：{/$real_amount/}元
            </td>
          </tr>
          </tfoot>
        </table>
         <table width="400">
        <tr>
           </tr>
       <tr>
            <td colspan="5"><input name="打印" type="button" onClick="prn1_preview()" class="button" value="打印" /></td>
          </tr>
           </table>
   </div>
    </div>
  </div><style>
  { font-weight:normal}
  </style>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
	<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
</object> 
 <script type="text/javascript" src="{/$root_dir/}/assets/js/LodopFuncs.js"></script>
 <script>
 	function CheckIsInstall() {	 
		try{ 
		     var LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM')); 
			if ((LODOP!=null)&&(typeof(LODOP.VERSION)!="undefined")) alert("本机已成功安装过Lodop控件!\n  版本号:"+LODOP.VERSION); 
		 }catch(err){ 
			//alert("Error:本机未安装或需要升级!"); 
 		 } 
	}; 
   var LODOP; //声明为全局变量 
function prn1_preview() {	
		CreateOneFormPage();	
		LODOP.PREVIEW();	
		//LODOP.PRINT();	
};
	function prn1_print() {		
		CreateOneFormPage();
		LODOP.PRINT();	
	};
	var num=$('#print>tbody>tr').length;
	var Pheight= num*14+140+'px';
	function CreateOneFormPage(){
		LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));  
		LODOP.PRINT_INIT("招财猪进销存管理软件表单输出");
	var strBodyStyle='  <style>*{padding:0;margin:0;font-size:12px;letter-spacing:1px;}.printTable{width:230px;border-collapse:collapse;line-height:16px; }thead th{height:18px; margin-top:5px; border-bottom:1px solid #000;}tbody td{ text-align:center;height:18px;}tbody th{ font-weight:normal;width:120px;}tbody p{width:100%;white-space:nowrap;overflow:hidden; text-align:left;}tfoot td{line-height:16px;border-top:1px solid #000;}  </style>';
		var strFormHtml=strBodyStyle+'招财猪进销存管理软件<table class="printTable">'+document.getElementById("print").innerHTML+'</table>';
	LODOP.ADD_PRINT_HTM(0,0,'230px',Pheight,strFormHtml);
    LODOP.ADD_PRINT_BARCODE(Pheight,0,'164px',30,"128Auto",$('#order_id').html());
   LODOP.SET_PRINT_STYLEA(0,"FontSize",6);
   LODOP.SET_PRINT_STYLEA(0,"Angle",0);
LODOP.SET_PRINT_PAGESIZE(3,1385,5,"");
	};	                     

 
 
/*document.onkeydown = function()
 {
          if(event.keyCode==116) {
          event.keyCode=0;
          event.returnValue = false;
          }
}
document.oncontextmenu = function() {event.returnValue = false;}*/
</script>
  {/include file="simpla/common/copy.html"/} </div>
{/include file="simpla/common/footer.html"/} 